package com.specificgroup.jira.plugin.acpro.service;

import com.specificgroup.jira.plugin.acpro.exception.AcproSettingsXmlException;
import com.specificgroup.jira.plugin.acpro.model.Settings;
import com.specificgroup.jira.plugin.acpro.xml.settings.generated.JiraAcproSettingsType;

import java.io.File;
import java.io.IOException;

/**
 *
 * @author Ivan Holub
 */
public interface JiraAcproSettingsService {

    String save(Settings settings);

    JiraAcproSettingsType unmarshalResponse(File file) throws AcproSettingsXmlException, IOException;

    String findUserMapping(JiraAcproSettingsType loadedSettings, String acproUserKey);

    String findNotifyEmailMapping(JiraAcproSettingsType loadedSettings, String email);

    String findIssueTypeMapping(JiraAcproSettingsType loadedSettings, String acproCategoryKey);

    String findIssueTypeCategoryIsNotSetMapping(JiraAcproSettingsType loadedSettings);

    String findPriorityMapping(JiraAcproSettingsType loadedSettings, String acproUrgencyKey);

    String findStatusMapping(JiraAcproSettingsType loadedSettings, String acproStatusKey);

    Long findProjectVersionMapping(JiraAcproSettingsType loadedSettings, String acproProductVersionName);
}
